package info.macnana.online.core.constant;

/**
 * author: zhengheng
 * github: https://github.com/macnana777
 * email: 517862340@qq.com
 * <p>
 * Date: 2017-08-01 14:15
 * Description: 错误码
 * Copyright(©) 2017 by zhengheng.
 */
public enum Code {
    SUCCESS(0,"成功"),
    ERROR(-1,"失败"),
    NOT_FOUNT(404, "找不到"),
    REPEAT(992, "数据重复"),
    CodeOR(993, "系统错误"),
    ADMIN_USER_REPEAT(994, "后台用户名重复"),
    NULL_DATA(995, "没有数据"),
    TIME_PASSED(996, "时间己过期"),
    INVALID_USER_PASSWORD(30001, "用户名或密码错误"),
    INVALID_USER_REPEAT(30002, "用户重复"),
    INVALID_CLIENTID(30003, "未经认证的客户端"),
    INVALID_TOKEN(30004, "token验证不匹配");


    private int resultCode;
    private String message;

    Code(int resultCode, String message) {
        this.resultCode = resultCode;
        this.message = message;
    }

    public int getResultCode() {
        return resultCode;
    }

    public String getMessage() {
        return message;
    }

}

